<template>
  <div class="comment">
    <TopNav titleTExt="我的跟帖" />
    <Comment v-for="item in commentList" :key="item.id" :item="item" />
  </div>
</template>

<script>
import Comment from "../comment/index";
import TopNav from "@/components/Topnav";
export default {
  data() {
    return {
      commentList: [],
    };
  },
  components: {
    Comment,
    TopNav,
  },
  created() {
    this.$axios({
      url: "/post_comment/" + this.$route.params.id,
    }).then((res) => {
      console.log(res.data);
      this.commentList = res.data.data;
    });
  },
};
</script>
<style lang="less" scoped>
.comment {
  padding: 10px;
}
</style>
